//----------------Sonic CD Mod Settings Menu Script-----------------//

// Aliases
#alias Object.Value0			:	Object.Timer
#alias Object.Value1			:	Object.CurrentButton
#alias Object.Value2			:	Object.SelectedOptionName
#alias Object.Value3			:	Object.SelectedOptionPresent
#alias Object.Value4			:	Object.SelectedOptionPast
#alias Object.Value5			:	Object.SelectedOptionBadFuture
#alias Object.Value6			:	Object.SelectedOptionGoodFuture
#alias Object.Value7			:	Object.PlaySong

// Object[+4] is Empty, only used to set the Maximum amount of options for the controls
#alias Object[+4].Value1			:	Object.OptionCount

// Object[+ArrayPos0] can be the BlankObjects 63, 64, 65 and 66. Depending of the CurrentSelection value
#alias Object[+ArrayPos0].Value2 	:	Object.FlickerText

// Object[33] is MenuHeading
#alias Object[33].State			:	MenuHeading.State
#alias Object[33].PropertyValue	:	MenuHeading.Header

// Object[-1] is MenuWindow
#alias Object[-1].State			:	MenuWindow.State
#alias Object[-1].Value1		:	MenuWindow.Width
#alias Object[-1].Value4		:	MenuWindow.BackTouchPress

// Mod Settings Menu States
#alias 0 	:	MODSETTINGSMENU_INIT
#alias 1 	:	MODSETTINGSMENU_DELAY
#alias 2 	:	MODSETTINGSMENU_OPTIONS
#alias 3	:	MODSETTINGSMENU_LEAVE
#alias 4	:	MODSETTINGSMENU_FADEIN
#alias 5	:	MODSETTINGSMENU_GOTOTITLE
#alias 6 	:	MODSETTINGSMENU_OPTIONSSEL

// Menu Heading States
#alias 1	:	MENUHEADING_LEAVE_SCREEN

// Menu Heading Property Values
#alias 5	:	MAINMENU_HEADER

// Menu Window States
#alias 3	:	MENUWINDOW_SHRINK

// Menu Button States
#alias 1	:	MENUBUTTON_BUTTONS_IN

// Presentation Stages
#alias 0	:	STAGE_P_TITLE

// Global SFX
#alias 23	:	SFX_G_MENUBUTTON
#alias 27	:	SFX_G_SELECT

// Stage SFX
#alias 1	:	SFX_S_BACKBUTTON


// Function Declarations
#function StopSong


// Function Definitions
function StopSong
	if Object.PlaySong == true
		if Music.CurrentTrack > 1
			PlayMusic(Options.Soundtrack)
		end if
		
		Object.PlaySong = false
	end if
end function


sub ObjectMain
	switch Object.State
	case MODSETTINGSMENU_INIT
	// Mod Settings' Menu's SaveRAM stuff
	ReadSaveRAM() // Read the RAM

	if SaveRAM[544] < 2
		SaveRAM[544] += 2
	end if

	if SaveRAM[545] < 2
		SaveRAM[545] += 2
	end if

	if SaveRAM[546] < 2
		SaveRAM[546] += 2
	end if

	Object.SelectedOptionName = SaveRAM[512]
	Object.SelectedOptionPresent = SaveRAM[513]
	Object.SelectedOptionPast = SaveRAM[514]
	Object.SelectedOptionGoodFuture = SaveRAM[515]
	Object.SelectedOptionBadFuture = SaveRAM[516]
	
#platform: Use_Origins
		if Options.PhysicalControls == false
			Object.CurrentButton = -1
		end if
#endplatform

#platform: Mobile
		if Options.PhysicalControls == false
			Object.CurrentButton = -1
		end if
#endplatform

		Object.XPos  = Screen.CenterX
		Object.XPos -= 126

		if Object.Timer < 256
			Object.Alpha  = Object.Timer
			Object.Timer += 6
		else
			Object.Timer = 0
			Object.Alpha = 255
			Object.State++
		end if
		break

	case MODSETTINGSMENU_DELAY
		if Object.Timer < 30
			Object.Timer++
		else
			Object.Timer = 0
			Object.State = MODSETTINGSMENU_OPTIONSSEL
		end if
		break
		
	case MODSETTINGSMENU_OPTIONSSEL
			if KeyPress[0].Up == true
				Object.CurrentButton--
				if Object.CurrentButton < 0
					Object.CurrentButton = 3
				end if
				PlaySfx(SFX_G_MENUBUTTON, false)
			end if

			if KeyPress[0].Down == true
				Object.CurrentButton++
				if Object.CurrentButton > 3
					Object.CurrentButton = 0
				end if
				PlaySfx(SFX_G_MENUBUTTON, false)
			end if

			CheckTouchRect(0, 0, Screen.XSize, Screen.YSize)
			if CheckResult > -1
#platform: Mobile
				Options.PhysicalControls = false
				Object.CurrentButton = -1
#endplatform

#platform: Use_Origins
				Options.PhysicalControls = false
				Object.CurrentButton = -1
#endplatform
			end if

	
		if Object.CurrentButton > -1
			if KeyPress[0].Start == true
				CheckResult = true
			end if
			
			if KeyPress[0].ButtonA == true
				CheckResult = true
			end if
		end if

		if CheckResult == true
			if Object.CurrentButton < 2
				ArrayPos0			= Object.CurrentButton
				Object.FlickerText	= 1
				Object.State++
				switch Object.CurrentButton
				case 0
					Object.state = MODSETTINGSMENU_OPTIONS
					Object.CurrentButton = 0
					Object[33].value7 = 0
					break

				case 1
					Object.state = MODSETTINGSMENU_OPTIONS
					Object.CurrentButton = 0
					Object[33].value7 = 1
					break

				case 2
					StopMusic()
					break

				case 3
					StopMusic()
					break

				end switch
				PlaySfx(SFX_G_SELECT, false)
			end if
		end if
		
		if KeyPress[0].ButtonB == true

#platform: Use_Origins
			Object.State = OPTIONS_RETURN_TO_TITLE
			Object.Timer = 0
			StopMusic()
#endplatform

#platform: Use_Standalone
			Object.Timer = 248
			Object.State = MODSETTINGSMENU_LEAVE
			PlayStageSfx(SFX_S_BACKBUTTON, false)
#endplatform
		end if
		break

	case MODSETTINGSMENU_OPTIONS
#platform: Standard
		CheckResult = true
#endplatform

#platform: Mobile
		CheckEqual(Options.PhysicalControls, true)
#endplatform

#platform: Use_Origins
		CheckEqual(Options.PhysicalControls, true)
#endplatform
		
		// 2011 Steam lacks Options.PhysicalControls, so we force it here first and the other platforms can override it
		if CheckResult == true
			if KeyPress[0].Up == true
				Object.CurrentButton--

				if Object.CurrentButton < 0
					Object.CurrentButton = 4
				end if

				PlaySfx(SFX_G_MENUBUTTON, false) 
				CallFunction(StopSong)
			end if

			if KeyPress[0].Down == true
				Object.CurrentButton++

				if Object.CurrentButton > 4
					Object.CurrentButton = 0
				end if

				PlaySfx(SFX_G_MENUBUTTON, false)
				CallFunction(StopSong)
			end if

			// The future touch screen code will go here
			// But that thing is pretty hard to understand
			// So i'll either do my own thing or just, like,
			// Make some hacky stuff so it gets to work
			if Object[33].Value7 == 0
				Object.SelectedOptionName = SaveRAM[512]
				Object.SelectedOptionPresent = SaveRAM[513]
				Object.SelectedOptionPast = SaveRAM[514]
				Object.SelectedOptionGoodFuture = SaveRAM[515]
				Object.SelectedOptionBadFuture = SaveRAM[516]

				switch Object.CurrentButton
					case 0 // Name
						if KeyPress[0].Left == true
							Object.SelectedOptionName--

							if Object.SelectedOptionName < 0
								Object.SelectedOptionName = 2
							end if

							PlaySfx(SFX_G_MENUBUTTON, false)
							SaveRAM[512] = Object.SelectedOptionName
							WriteSaveRAM() 
						end if

						if KeyPress[0].Right == true
							Object.SelectedOptionName++

							if Object.SelectedOptionName > 2
								Object.SelectedOptionName = 0
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							SaveRAM[512] = Object.SelectedOptionName
							WriteSaveRAM()
						end if
						break

					case 1 // Present
						if KeyPress[0].Left == true
							Object.SelectedOptionPresent--

							if Object.SelectedOptionPresent < 0
								Object.SelectedOptionPresent = 3
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							CallFunction(StopSong)

							SaveRAM[513] = Object.SelectedOptionPresent
							WriteSaveRAM()
						end if

						if KeyPress[0].Right == true
							Object.SelectedOptionPresent++

							if Object.SelectedOptionPresent > 3
								Object.SelectedOptionPresent = 0
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							CallFunction(StopSong)

							SaveRAM[513] = Object.SelectedOptionPresent
							WriteSaveRAM()
						end if
						break

					case 2 // Past
						if KeyPress[0].Left == true
							Object.SelectedOptionPast--

							if Object.SelectedOptionPast < 0
								Object.SelectedOptionPast = 4
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							CallFunction(StopSong)

							SaveRAM[514] = Object.SelectedOptionPast
							WriteSaveRAM()
						end if
						
						if KeyPress[0].Right == true
							Object.SelectedOptionPast++

							if Object.SelectedOptionPast > 4
								Object.SelectedOptionPast = 0
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							CallFunction(StopSong)

							SaveRAM[514] = Object.SelectedOptionPast
							WriteSaveRAM()
						end if
						break
				
					case 3 // Good Future
						if KeyPress[0].Left == true
							Object.SelectedOptionGoodFuture--

							if Object.SelectedOptionGoodFuture < 0
								Object.SelectedOptionGoodFuture = 4
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							CallFunction(StopSong)

							SaveRAM[515] = Object.SelectedOptionGoodFuture
							WriteSaveRAM()
						end if
						
						if KeyPress[0].Right == true
							Object.SelectedOptionGoodFuture++

							if Object.SelectedOptionGoodFuture > 4
								Object.SelectedOptionGoodFuture = 0
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							CallFunction(StopSong)

							SaveRAM[515] = Object.SelectedOptionGoodFuture
							WriteSaveRAM()
						end if
						break
				
					case 4 // Bad Future
						if KeyPress[0].Left == true
							Object.SelectedOptionBadFuture--

							if Object.SelectedOptionBadFuture < 0
								Object.SelectedOptionBadFuture = 4
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							CallFunction(StopSong)

							SaveRAM[516] = Object.SelectedOptionBadFuture
							WriteSaveRAM()
						end if
						
						if KeyPress[0].Right == true
							Object.SelectedOptionBadFuture++

							if Object.SelectedOptionBadFuture > 4
								Object.SelectedOptionBadFuture = 0
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							CallFunction(StopSong)

							SaveRAM[516] = Object.SelectedOptionBadFuture
							WriteSaveRAM()
						end if
						break
				end switch
			else
				Object.SelectedOptionName = SaveRAM[542]
				Object.SelectedOptionPresent = SaveRAM[543]
				Object.SelectedOptionPast = SaveRAM[544]
				Object.SelectedOptionGoodFuture = SaveRAM[545]
				Object.SelectedOptionBadFuture = SaveRAM[546]

				switch Object.CurrentButton
					case 0 // Name
						if KeyPress[0].Left == true
							Object.SelectedOptionName--

							if Object.SelectedOptionName < 0
								Object.SelectedOptionName = 1
							end if

							PlaySfx(SFX_G_MENUBUTTON, false)
							SaveRAM[542] = Object.SelectedOptionName
							WriteSaveRAM() 
						end if

						if KeyPress[0].Right == true
							Object.SelectedOptionName++

							if Object.SelectedOptionName > 1
								Object.SelectedOptionName = 0
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							SaveRAM[542] = Object.SelectedOptionName
							WriteSaveRAM()
						end if
						break

					case 1 // Present
						if KeyPress[0].Left == true
							Object.SelectedOptionPresent--

							if Object.SelectedOptionPresent < 0
								Object.SelectedOptionPresent = 3
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							CallFunction(StopSong)

							SaveRAM[543] = Object.SelectedOptionPresent
							WriteSaveRAM()
						end if

						if KeyPress[0].Right == true
							Object.SelectedOptionPresent++

							if Object.SelectedOptionPresent > 3
								Object.SelectedOptionPresent = 0
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							CallFunction(StopSong)

							SaveRAM[543] = Object.SelectedOptionPresent
							WriteSaveRAM()
						end if
						break

					case 2 // Past
						if KeyPress[0].Left == true
							Object.SelectedOptionPast--

							if Object.SelectedOptionPast < 0
								Object.SelectedOptionPast = 3
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							CallFunction(StopSong)

							SaveRAM[544] = Object.SelectedOptionPast
							WriteSaveRAM()
						end if
						
						if KeyPress[0].Right == true
							Object.SelectedOptionPast++

							if Object.SelectedOptionPast > 3
								Object.SelectedOptionPast = 0
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							CallFunction(StopSong)

							SaveRAM[544] = Object.SelectedOptionPast
							WriteSaveRAM()
						end if
						break
				
					case 3 // Good Future
						if KeyPress[0].Left == true
							Object.SelectedOptionGoodFuture--

							if Object.SelectedOptionGoodFuture < 0
								Object.SelectedOptionGoodFuture = 3
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							CallFunction(StopSong)

							SaveRAM[545] = Object.SelectedOptionGoodFuture
							WriteSaveRAM()
						end if
						
						if KeyPress[0].Right == true
							Object.SelectedOptionGoodFuture++

							if Object.SelectedOptionGoodFuture > 3
								Object.SelectedOptionGoodFuture = 0
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							CallFunction(StopSong)

							SaveRAM[545] = Object.SelectedOptionGoodFuture
							WriteSaveRAM()
						end if
						break
				
					case 4 // Bad Future
						if KeyPress[0].Left == true
							Object.SelectedOptionBadFuture--

							if Object.SelectedOptionBadFuture < 0
								Object.SelectedOptionBadFuture = 3
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							CallFunction(StopSong)

							SaveRAM[546] = Object.SelectedOptionBadFuture
							WriteSaveRAM()
						end if
						
						if KeyPress[0].Right == true
							Object.SelectedOptionBadFuture++

							if Object.SelectedOptionBadFuture > 3
								Object.SelectedOptionBadFuture = 0
							end if

							PlaySfx(SFX_G_MENUBUTTON, false) 
							CallFunction(StopSong)

							SaveRAM[546] = Object.SelectedOptionBadFuture
							WriteSaveRAM()
						end if
						break
				end switch
			end if
			if KeyPress[0].ButtonB == true
#platform: Use_Origins
				Object.State = MODSETTINGSMENU_GOTOTITLE
				Object.Timer = 0
				StopMusic()
#endplatform
	
#platform: Use_Standalone
				Object.Timer = 248
				Object.State = MODSETTINGSMENU_OPTIONSSEL
				if Music.CurrentTrack > 1
					PlayMusic(Options.Soundtrack)
				end if

				PlayStageSfx(SFX_S_BACKBUTTON, false)
				Object.CurrentButton = 0
#endplatform


				if SaveRAM[544] < 2
					SaveRAM[544] += 2
					CheckResult = true
				end if

				if SaveRAM[545] < 2
					SaveRAM[545] += 2
					CheckResult = true
				end if

				if SaveRAM[546] < 2
					SaveRAM[546] += 2
					CheckResult = true
				end if

				if CheckResult == true
					WriteSaveRAM()
				end if
			end if
		end if
		break
		
	case MODSETTINGSMENU_LEAVE
		if Object.Timer > 0
			Object.Alpha  = Object.Timer
			Object.Timer -= 8
		else
			Object.Type = TypeName[Blank Object]
			MenuWindow.State = MENUWINDOW_SHRINK

			// All of this is MenuButton objects
			Object[34].State = MENUBUTTON_BUTTONS_IN
			Object[35].State = MENUBUTTON_BUTTONS_IN
			Object[36].State = MENUBUTTON_BUTTONS_IN
			Object[37].State = MENUBUTTON_BUTTONS_IN
			Object[38].State = MENUBUTTON_BUTTONS_IN
			Object[39].State = MENUBUTTON_BUTTONS_IN
			Object[40].State = MENUBUTTON_BUTTONS_IN
			Object[41].State = MENUBUTTON_BUTTONS_IN
			Object[42].State = MENUBUTTON_BUTTONS_IN
			Object[43].State = MENUBUTTON_BUTTONS_IN
			Object[44].State = MENUBUTTON_BUTTONS_IN

			// The End of everything, it seems...
			MenuHeading.State  = MENUHEADING_LEAVE_SCREEN
			MenuHeading.Header = MAINMENU_HEADER
		end if

		CallFunction(StopSong)
		break

	case MODSETTINGSMENU_FADEIN
		if Object.Timer > 0
			Object.Timer -= 8
		else
			if Music.CurrentTrack > 1
				PlayMusic(Options.Soundtrack)
			end if
		end if

		TempValue0 = Object.Timer

		if TempValue0 > 255
			TempValue0 = 255
		end if

		SetScreenFade(0, 0, 0, TempValue0)
		break

	case MODSETTINGSMENU_GOTOTITLE
		Object.Timer += 4

		if Object.Timer == 384
			Stage.ActiveList = PRESENTATION_STAGE
			Stage.ListPos	 = STAGE_P_TITLE
			LoadStage()
		end if

		SetScreenFade(0, 0, 0, Object.Timer)
		break

	end switch
end sub


sub ObjectDraw
	switch Object.State
	case MODSETTINGSMENU_OPTIONS
		if Object[33].Value7 == 0
			Object.YPos  = Screen.CenterY
			Object.YPos -= 87
			DrawSpriteScreenFX(10, FX_INK, Object.XPos, Object.YPos) // R2 Name

			TempValue0 = Object.XPos
			TempValue0 -= 2
			TempValue1 = MenuWindow.Width
			TempValue1 -= 2
			DrawRect(TempValue0, 62, TempValue1, 1, 64, 64, 64, 255) // Awful Line

			TempValue0 = Object.YPos
			TempValue0 += 31
			TempValue1 = Object.XPos
			TempValue1 += 128
			DrawSpriteScreenFX(11, FX_INK, Object.XPos, TempValue0) // R2 SoundTrack
			DrawSpriteScreenFX(42, FX_INK, TempValue1, TempValue0) // Press A to play song
			TempValue0 += 20
			DrawSpriteScreenFX(12, FX_INK, Object.XPos, TempValue0) // Present
			TempValue0 += 20
			DrawSpriteScreenFX(13, FX_INK, Object.XPos, TempValue0) // Past
			TempValue0 += 20
			DrawSpriteScreenFX(14, FX_INK, Object.XPos, TempValue0) // Bad Future
			TempValue0 += 20 
			DrawSpriteScreenFX(15, FX_INK, Object.XPos, TempValue0) // Good Future
			TempValue0 += 20
			DrawSpriteScreenFX(16, FX_INK, Object.XPos, TempValue0) // Author

			switch SaveRAM[512] // Zone Name
			case 0	// Dubious Depths
				TempValue1 = Object.XPos
				TempValue1 += 128

				if Object.SelectedOptionName == 0
					if Object.CurrentButton == 0
						DrawSpriteScreenFX(20, FX_INK, TempValue1, Object.YPos) // Dubious Depths (Selected)
					else
						DrawSpriteScreenFX(17, FX_INK, TempValue1, Object.YPos) // Dubious Depths
					end if
				else
					DrawSpriteScreenFX(17, FX_INK, TempValue1, Object.YPos) // Dubious Depths
				end if
				break
				
			case 1	// Ridicule Root
				TempValue1 = Object.XPos
				TempValue1 += 128

				if Object.SelectedOptionName == 1
					if Object.CurrentButton == 0
						DrawSpriteScreenFX(21, FX_INK, TempValue1, Object.YPos) // Ridicule Root (Selected)
					else
						DrawSpriteScreenFX(18, FX_INK, TempValue1, Object.YPos) // Ridicule Root
					end if
				else
					DrawSpriteScreenFX(18, FX_INK, TempValue1, Object.YPos) // Ridicule Root
				end if
				break

			case 2	// Relic Ruins
				TempValue1 = Object.XPos
				TempValue1 += 128
				if Object.SelectedOptionName == 2
					if Object.CurrentButton == 0
						DrawSpriteScreenFX(22, FX_INK, TempValue1, Object.YPos) // Relic Ruins (Selected)
					else
						DrawSpriteScreenFX(19, FX_INK, TempValue1, Object.YPos) // Relic Ruins
					end if
				else
					DrawSpriteScreenFX(19, FX_INK, TempValue1, Object.YPos) // Relic Ruins
				end if
				break

			end switch
		
			TempValue3 = Object.XPos
			TempValue3 += 128
			TempValue4 = Object.YPos
			TempValue4 += 131
					
			switch SaveRAM[513] // Present Music
			case 0	// Original
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 51
				
				if Object.SelectedOptionPresent == 0
					if Object.CurrentButton == 1
						DrawSpriteScreenFX(30, FX_INK, TempValue1, TempValue2) // Original (Selected)
						TempValue1 += 72
						DrawSpriteScreenFX(32, FX_INK, TempValue1, TempValue2) // JP (Selected)
						DrawSpriteScreenFX(39, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("JP/R2A.ogg", 2, true) // JP/Original
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(23, FX_INK, TempValue1, TempValue2) // Original
						TempValue1 += 72
						DrawSpriteScreenFX(25, FX_INK, TempValue1, TempValue2) // JP
					end if
				end if
				break
				
			case 1	// US
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 51
				if Object.SelectedOptionPresent == 1
					if Object.CurrentButton == 1
						DrawSpriteScreenFX(31, FX_INK, TempValue1, TempValue2) // US (Selected)
						DrawSpriteScreenFX(51, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("US/R2A.ogg", 2, true) // US
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(24, FX_INK, TempValue1, TempValue2) // US
					end if
				end if
				break
				
			case 2	// Alt. Mix 1
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 51
					if Object.SelectedOptionPresent == 2
						if Object.CurrentButton == 1
							DrawSpriteScreenFX(33, FX_INK, TempValue1, TempValue2) // Alt. Mix 1 (Selected)
							DrawSpriteScreenFX(60, FX_INK, TempValue3, TempValue4) // - Author

							if Object.PlaySong == false // No Spam? :(
								if KeyPress[0].ButtonA == true
									SetMusicTrack("ALT1/R2A.ogg", 2, true) // Alt. Mix 1
									PlayMusic(2)
									Object.PlaySong = true
								end if
							end if
						else
							DrawSpriteScreenFX(26, FX_INK, TempValue1, TempValue2) // Alt. Mix 1
						end if
					end if
				break
				
			case 3	// Alt. Mix 2
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 51
				if Object.SelectedOptionPresent == 3
					if Object.CurrentButton == 1
						DrawSpriteScreenFX(35, FX_INK, TempValue1, TempValue2) // Alt. Mix 2 (Selected)
						DrawSpriteScreenFX(37, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("ALT2/R2A.ogg", 2, true) // Alt. Mix 2
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(28, FX_INK, TempValue1, TempValue2) // Alt. Mix 2
					end if
				end if
				break
			end switch
			
			switch SaveRAM[514] // Past Music
			case 0	// JP
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 71
				
				if Object.SelectedOptionPast == 0
					if Object.CurrentButton == 2
						DrawSpriteScreenFX(32, FX_INK, TempValue1, TempValue2) // JP (Selected)
						DrawSpriteScreenFX(38, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("R2B.ogg", 2, true) // JP
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(25, FX_INK, TempValue1, TempValue2) // JP
					end if
				end if
				break

			case 1	// US
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 71
				if Object.SelectedOptionPast == 1
					if Object.CurrentButton == 2
						DrawSpriteScreenFX(31, FX_INK, TempValue1, TempValue2) // US (Selected)
						DrawSpriteScreenFX(51, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("US/R2B.ogg", 2, true) // US
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(24, FX_INK, TempValue1, TempValue2) // US
					end if
				end if
				break
				
			case 2	//  Alt. Mix 1
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 71
					if Object.SelectedOptionPast == 2
						if Object.CurrentButton == 2
							DrawSpriteScreenFX(33, FX_INK, TempValue1, TempValue2) //  Alt. Mix 1 (Selected)
							DrawSpriteScreenFX(60, FX_INK, TempValue3, TempValue4) // - Author
							if Object.PlaySong == false // No Spam? :(
								if KeyPress[0].ButtonA == true
									SetMusicTrack("ALT1/R2B.ogg", 2, true) //  Alt. Mix 1
									PlayMusic(2)
									Object.PlaySong = true
								end if
							end if
						else
							DrawSpriteScreenFX(26, FX_INK, TempValue1, TempValue2) //  Alt. Mix 1
						end if
					end if
				break
				
			case 3	// Alt. Mix 2
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 71

				if Object.SelectedOptionPast == 3
					if Object.CurrentButton == 2
						DrawSpriteScreenFX(35, FX_INK, TempValue1, TempValue2) // Alt. Mix 2 (Selected)
						DrawSpriteScreenFX(37, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("ALT2/R2B.ogg", 2, true) // Alt. Mix 2
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(28, FX_INK, TempValue1, TempValue2) // Alt. Mix 2
					end if
				end if
				break
				
			case 4	// Alt. Mix 3
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 71

				if Object.SelectedOptionPast == 4
					if Object.CurrentButton == 2
						DrawSpriteScreenFX(36, FX_INK, TempValue1, TempValue2) // Alt. Mix 3 (Selected)
						DrawSpriteScreenFX(40, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("ALT3/R2B_colterex.ogg", 2, true) // Alt. Mix 3
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(29, FX_INK, TempValue1, TempValue2) // Alt. Mix 3
					end if
				end if
				break
			end switch
			
			switch SaveRAM[515] // Good Future Music
			case 0	// JP
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 91
				
				if Object.SelectedOptionGoodFuture == 0
					if Object.CurrentButton == 3
						DrawSpriteScreenFX(32, FX_INK, TempValue1, TempValue2) // JP (Selected)
						DrawSpriteScreenFX(38, FX_INK, TempValue3, TempValue4) // - Author
						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("JP/R2C.ogg", 2, true) // JP
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(25, FX_INK, TempValue1, TempValue2) // JP
					end if
				end if
				break

			case 1	// US
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 91
				if Object.SelectedOptionGoodFuture == 1
					if Object.CurrentButton == 3
						DrawSpriteScreenFX(31, FX_INK, TempValue1, TempValue2) // US (Selected)
						DrawSpriteScreenFX(51, FX_INK, TempValue3, TempValue4) // - Author
						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("US/R2C.ogg", 2, true) // US
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(24, FX_INK, TempValue1, TempValue2) // US
					end if
				end if
				break

			case 2	// Alt. Mix 1
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 91

				if Object.SelectedOptionGoodFuture == 2
					if Object.CurrentButton == 3
						DrawSpriteScreenFX(33, FX_INK, TempValue1, TempValue2) // Alt. Mix 1 (Selected)
						DrawSpriteScreenFX(60, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("ALT1/R2C.ogg", 2, true) // Alt. Mix 1
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(26, FX_INK, TempValue1, TempValue2) // Alt. Mix 1
					end if
				end if
				break

			case 3	// Alt. Mix 2
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 91

				if Object.SelectedOptionGoodFuture == 3
					if Object.CurrentButton == 3
						DrawSpriteScreenFX(35, FX_INK, TempValue1, TempValue2) // Alt. Mix 2 (Selected)
						DrawSpriteScreenFX(37, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("ALT2/R2C.ogg", 2, true) // Alt. Mix 2
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(28, FX_INK, TempValue1, TempValue2) // Alt. Mix 2
					end if
				end if
				break
				
			case 4	// Alt. Mix 3
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 91
				
				if Object.SelectedOptionGoodFuture == 4
					if Object.CurrentButton == 3
						DrawSpriteScreenFX(36, FX_INK, TempValue1, TempValue2) // Alt. Mix 3 (Selected)
						DrawSpriteScreenFX(39, FX_INK, TempValue3, TempValue4) // - Author
						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("ALT3/R2C_SonicStream.ogg", 2, true)	// Alt. Mix 3
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(29, FX_INK, TempValue1, TempValue2) // Alt. Mix 3
					end if
				end if
				break
			end switch
			
			switch SaveRAM[516] // Bad Future Music
			case 0	// JP
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 111
				
				if Object.SelectedOptionBadFuture == 0
					if Object.CurrentButton == 4
						DrawSpriteScreenFX(32, FX_INK, TempValue1, TempValue2) // JP (Selected)
						DrawSpriteScreenFX(38, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("JP/R2D.ogg", 2, true) // JP
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(25, FX_INK, TempValue1, TempValue2) // JP
					end if
				end if
				break
				
			case 1	// US
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 111

				if Object.SelectedOptionBadFuture == 1
					if Object.CurrentButton == 4
						DrawSpriteScreenFX(31, FX_INK, TempValue1, TempValue2) // US (Selected)
						DrawSpriteScreenFX(62, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("US/R2D.ogg", 2, true) // US
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(24, FX_INK, TempValue1, TempValue2) // US
					end if
				end if
				break
				
			case 2	// Alt. Mix 1
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 111

				if Object.SelectedOptionBadFuture == 2
					if Object.CurrentButton == 4
						DrawSpriteScreenFX(33, FX_INK, TempValue1, TempValue2) // Alt. Mix 1 (Selected)
						DrawSpriteScreenFX(60, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("ALT1/R2D.ogg", 2, true) // Alt. Mix 1
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(26, FX_INK, TempValue1, TempValue2) // Alt. Mix 1
					end if
				end if
				break
				
			case 3	// Alt. Mix 2
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 111

				if Object.SelectedOptionBadFuture == 3
					if Object.CurrentButton == 4
						DrawSpriteScreenFX(35, FX_INK, TempValue1, TempValue2) // Alt. Mix 2 (Selected)
						DrawSpriteScreenFX(37, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("ALT2/R2D.ogg", 2, true) // Alt. Mix 2
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(28, FX_INK, TempValue1, TempValue2) // Alt. Mix 2
					end if
				end if
				break

			case 4	// Alt. Mix 3
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 111

				if Object.SelectedOptionBadFuture == 4
					if Object.CurrentButton == 4
						DrawSpriteScreenFX(36, FX_INK, TempValue1, TempValue2) // Alt. Mix 3 (Selected)
						DrawSpriteScreenFX(40, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("ALT3/R2D_colterex.ogg", 2, true) // Alt. Mix 3
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(29, FX_INK, TempValue1, TempValue2) // Alt. Mix 3
					end if
				end if
				break
			end switch
		else
			Object.YPos  = Screen.CenterY
			Object.YPos -= 87
			DrawSpriteScreenFX(52, FX_INK, Object.XPos, Object.YPos) // R5 Name

			TempValue0 = Object.XPos
			TempValue0 -= 2
			TempValue1 = MenuWindow.Width
			TempValue1 -= 2
			DrawRect(TempValue0, 62, TempValue1, 1, 64, 64, 64, 255) // Awful Line

			TempValue0 = Object.YPos
			TempValue0 += 31
			TempValue1 = Object.XPos
			TempValue1 += 128
			DrawSpriteScreenFX(53, FX_INK, Object.XPos, TempValue0) // R5 SoundTrack
			DrawSpriteScreenFX(42, FX_INK, TempValue1, TempValue0) // Press A to play song
			TempValue0 += 20
			DrawSpriteScreenFX(12, FX_INK, Object.XPos, TempValue0) // Present
			TempValue0 += 20
			DrawSpriteScreenFX(13, FX_INK, Object.XPos, TempValue0) // Past
			TempValue0 += 20
			DrawSpriteScreenFX(14, FX_INK, Object.XPos, TempValue0) // Bad Future
			TempValue0 += 20 
			DrawSpriteScreenFX(15, FX_INK, Object.XPos, TempValue0) // Good Future
			TempValue0 += 20
			DrawSpriteScreenFX(16, FX_INK, Object.XPos, TempValue0) // Author

			switch SaveRAM[542] // Zone Name
			case 0	// Baneful Badland
				TempValue1 = Object.XPos
				TempValue1 += 128

				if Object.SelectedOptionName == 0
					if Object.CurrentButton == 0
						DrawSpriteScreenFX(57, FX_INK, TempValue1, Object.YPos) // Baneful Badland (Selected)
					else
						DrawSpriteScreenFX(55, FX_INK, TempValue1, Object.YPos) // Baneful Badland
					end if
				else
					DrawSpriteScreenFX(55, FX_INK, TempValue1, Object.YPos) // Baneful Badland
				end if
				break
				
			case 1	// Desert Dazzle
				TempValue1 = Object.XPos
				TempValue1 += 128

				if Object.SelectedOptionName == 1
					if Object.CurrentButton == 0
						DrawSpriteScreenFX(56, FX_INK, TempValue1, Object.YPos) // Desert Dazzle (Selected)
					else
						DrawSpriteScreenFX(54, FX_INK, TempValue1, Object.YPos) // Desert Dazzle
					end if
				else
					DrawSpriteScreenFX(54, FX_INK, TempValue1, Object.YPos) // Desert Dazzle
				end if
				break

			end switch
		
			TempValue3 = Object.XPos
			TempValue3 += 128
			TempValue4 = Object.YPos
			TempValue4 += 131
					
			switch SaveRAM[543] // Present Music
			case 0	// JP
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 51
				
				if Object.SelectedOptionPresent == 0
					if Object.CurrentButton == 1
						DrawSpriteScreenFX(32, FX_INK, TempValue1, TempValue2) // JP (Selected)
						DrawSpriteScreenFX(59, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("JP/R4.5A.ogg", 2, true) // JP/Original
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(25, FX_INK, TempValue1, TempValue2) // JP
					end if
				end if
				break
				
			case 1	// US
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 51
				if Object.SelectedOptionPresent == 1
					if Object.CurrentButton == 1
						DrawSpriteScreenFX(31, FX_INK, TempValue1, TempValue2) // US (Selected)
						DrawSpriteScreenFX(51, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("US/R4.5A.ogg", 2, true) // US
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(24, FX_INK, TempValue1, TempValue2) // US
					end if
				end if
				break
				
			case 2	// Alt. Mix 1
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 51
				if Object.SelectedOptionPresent == 2
					if Object.CurrentButton == 1
						DrawSpriteScreenFX(33, FX_INK, TempValue1, TempValue2) // Alt. Mix 1 (Selected)
						DrawSpriteScreenFX(38, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("ALT1/R4.5A.ogg", 2, true) // Alt. Mix 1
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(26, FX_INK, TempValue1, TempValue2) // Alt. Mix 1
					end if
				end if
				break
				
			case 3	// Alt. Mix 2
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 51
				if Object.SelectedOptionPresent == 3
					if Object.CurrentButton == 1
						DrawSpriteScreenFX(35, FX_INK, TempValue1, TempValue2) //  Alt. Mix 2 (Selected)
						DrawSpriteScreenFX(58, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("ALT2/R4.5A.ogg", 2, true) // Alt. Mix 2
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(28, FX_INK, TempValue1, TempValue2) //  Alt. Mix 2
					end if
				end if
				break
			end switch
			
			switch SaveRAM[544] // Past Music
			case 0	// JP
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 71
				
				if Object.SelectedOptionPast == 0
					if Object.CurrentButton == 2
						DrawSpriteScreenFX(32, FX_INK, TempValue1, TempValue2) // JP (Selected)
						DrawSpriteScreenFX(61, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								//SetMusicTrack("R4.5B.ogg", 2, true) // JP/Original
								//PlayMusic(2)
								//Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(25, FX_INK, TempValue1, TempValue2) // JP
					end if
				end if
				break
				
			case 1	// US
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 71
				if Object.SelectedOptionPast == 1
					if Object.CurrentButton == 2
						DrawSpriteScreenFX(31, FX_INK, TempValue1, TempValue2) // US (Selected)
						DrawSpriteScreenFX(61, FX_INK, TempValue3, TempValue4) // - Author
						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								//SetMusicTrack("US/R4.5B.ogg", 2, true) // US
								//PlayMusic(2)
								//Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(24, FX_INK, TempValue1, TempValue2) // US
					end if
				end if
				break
				
			case 2	// Alt. Mix 1
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 71

				if Object.SelectedOptionPast == 2
					if Object.CurrentButton == 2
						DrawSpriteScreenFX(33, FX_INK, TempValue1, TempValue2) // Alt. Mix 1 (Selected)
						DrawSpriteScreenFX(38, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("ALT1/R4.5B.ogg", 2, true) // Alt. Mix 1
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(26, FX_INK, TempValue1, TempValue2) // Alt. Mix 1
					end if
				end if
				break
				
			case 3	// Alt. Mix 2
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 71

				if Object.SelectedOptionPast == 3
					if Object.CurrentButton == 2
							DrawSpriteScreenFX(35, FX_INK, TempValue1, TempValue2) // Alt. Mix 2 (Selected)
							DrawSpriteScreenFX(58, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("ALT2/R4.5B.ogg", 2, true) // Alt. Mix 2
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(28, FX_INK, TempValue1, TempValue2) // Alt. Mix 2
					end if
				end if
				break
			end switch
			
			switch SaveRAM[545] // Good Future Music
			case 0	// JP
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 91
				
				if Object.SelectedOptionGoodFuture == 0
					if Object.CurrentButton == 3
						DrawSpriteScreenFX(32, FX_INK, TempValue1, TempValue2) // JP (Selected)
						DrawSpriteScreenFX(61, FX_INK, TempValue3, TempValue4) // - Author
						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								//SetMusicTrack("JP/R4.5C.ogg", 2, true) // JP/Original
								//PlayMusic(2)
								//Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(25, FX_INK, TempValue1, TempValue2) // JP
					end if
				end if
				break
				
			case 1	// US
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 91
				
				if Object.SelectedOptionGoodFuture == 1
					if Object.CurrentButton == 3
						DrawSpriteScreenFX(31, FX_INK, TempValue1, TempValue2) // US (Selected)
						DrawSpriteScreenFX(61, FX_INK, TempValue3, TempValue4) // - Author
						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								//SetMusicTrack("US/R4.5C.ogg", 2, true) // US
								//PlayMusic(2)
								//Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(24, FX_INK, TempValue1, TempValue2) // US
					end if
				end if
				break
				
			case 2	// Alt. Mix 1
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 91
				if Object.SelectedOptionGoodFuture == 2
					if Object.CurrentButton == 3
						DrawSpriteScreenFX(33, FX_INK, TempValue1, TempValue2) // Alt. Mix 1 (Selected)
						DrawSpriteScreenFX(38, FX_INK, TempValue3, TempValue4) // - Author
						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("ALT1/R4.5C.ogg", 2, true) // Alt. Mix 1
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(26, FX_INK, TempValue1, TempValue2) // Alt. Mix 1
					end if
				end if
				break
				
			case 3	// Alt. Mix 2
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 91
				if Object.SelectedOptionGoodFuture == 3
					if Object.CurrentButton == 3
						DrawSpriteScreenFX(35, FX_INK, TempValue1, TempValue2) //  Alt. Mix 2 (Selected)
						DrawSpriteScreenFX(58, FX_INK, TempValue3, TempValue4) // - Author
						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("ALT2/R4.5C.ogg", 2, true) // Alt. Mix 2
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(28, FX_INK, TempValue1, TempValue2) //  Alt. Mix 2
					end if
				end if
				break
			end switch
			
			switch SaveRAM[546] // Bad Future Music
			case 0	// JP
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 111
				
				if Object.SelectedOptionBadFuture == 0
					if Object.CurrentButton == 4
						DrawSpriteScreenFX(32, FX_INK, TempValue1, TempValue2) // JP (Selected)
						DrawSpriteScreenFX(61, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
							//	SetMusicTrack("JP/R4.5D.ogg", 2, true) // JP/Original
							//	PlayMusic(2)
							//	Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(25, FX_INK, TempValue1, TempValue2) // JP
					end if
				end if
				break
				
			case 1	// US
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 111

				if Object.SelectedOptionBadFuture == 1
					if Object.CurrentButton == 4
						DrawSpriteScreenFX(31, FX_INK, TempValue1, TempValue2) // US (Selected)
						DrawSpriteScreenFX(61, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
							//	SetMusicTrack("US/R4.5D.ogg", 2, true) // US
							//	PlayMusic(2)
							//	Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(24, FX_INK, TempValue1, TempValue2) // US
					end if
				end if
				break
				
			case 2	// Alt. Mix 1
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 111

				if Object.SelectedOptionBadFuture == 2
					if Object.CurrentButton == 4
						DrawSpriteScreenFX(33, FX_INK, TempValue1, TempValue2) // Alt. Mix 2 (Selected)
						DrawSpriteScreenFX(38, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("ALT1/R4.5D.ogg", 2, true) // Alt. Mix 1
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(26, FX_INK, TempValue1, TempValue2) // Alt. Mix 1
					end if
				end if
				break
				
			case 3	// Alt. Mix 2
				TempValue1 = Object.XPos
				TempValue1 += 128
				TempValue2 = Object.YPos
				TempValue2 += 111

				if Object.SelectedOptionBadFuture == 3
					if Object.CurrentButton == 4
							DrawSpriteScreenFX(35, FX_INK, TempValue1, TempValue2) // Alt. Mix 1 (Selected)
							DrawSpriteScreenFX(58, FX_INK, TempValue3, TempValue4) // - Author

						if Object.PlaySong == false // No Spam? :(
							if KeyPress[0].ButtonA == true
								SetMusicTrack("ALT2/R4.5D.ogg", 2, true) // Alt. Mix 2
								PlayMusic(2)
								Object.PlaySong = true
							end if
						end if
					else
						DrawSpriteScreenFX(28, FX_INK, TempValue1, TempValue2) // Alt. Mix 1
					end if
				end if
				break
			end switch
		end if
		break

		case MODSETTINGSMENU_OPTIONSSEL
		case MODSETTINGSMENU_INIT
		case MODSETTINGSMENU_DELAY
		case MODSETTINGSMENU_FADEIN
		case MODSETTINGSMENU_LEAVE
		case MODSETTINGSMENU_GOTOTITLE
			Object.YPos  = Screen.CenterY
			Object.YPos -= 87
			ArrayPos0 = 0
			if Object.CurrentButton == 0
				DrawSpriteScreenFX(9, FX_INK, Object.XPos, Object.YPos)
				DrawSpriteScreenFX(47, FX_INK, Object.XPos, Object.YPos)
			else
				DrawSpriteScreenFX(43, FX_INK, Object.XPos, Object.YPos)
			end if

			CallFunction(OptionsMenu_DrawOptions2)
			Object.YPos += 40
			if Object.CurrentButton == 1
				DrawSpriteScreenFX(9, FX_INK, Object.XPos, Object.YPos)
				DrawSpriteScreenFX(48, FX_INK, Object.XPos, Object.YPos)
			else
				DrawSpriteScreenFX(44, FX_INK, Object.XPos, Object.YPos)
			end if

			ArrayPos0++
			CallFunction(OptionsMenu_DrawOptions2)
			Object.YPos += 40
			if Object.CurrentButton == 2
				DrawSpriteScreenFX(49, FX_INK, Object.XPos, Object.YPos)
			else
				DrawSpriteScreenFX(45, FX_INK, Object.XPos, Object.YPos)
			end if

			ArrayPos0++
			CallFunction(OptionsMenu_DrawOptions2)
			Object.YPos += 40
			if Object.CurrentButton == 3
				DrawSpriteScreenFX(50, FX_INK, Object.XPos, Object.YPos)
			else
				DrawSpriteScreenFX(46, FX_INK, Object.XPos, Object.YPos)
			end if
			
			ArrayPos0++
			CallFunction(OptionsMenu_DrawOptions2)
			break
	end switch
end sub

sub ObjectStartup
	LoadSpriteSheet("Menu/MenuGfx2_EN.gif")
	
	SpriteFrame(4, 2, 32, 32, 479, 34)		// #0 - Gear
	SpriteFrame(4, 2, 32, 32, 479, 34)		// #1 - Gear Again
	SpriteFrame(4, 2, 32, 32, 479, 34)		// #2 - Why is this a Gear again
	SpriteFrame(4, 2, 32, 32, 479, 34)		// #3 - Please Stop.
	SpriteFrame(0, 0, 20, 20, 168, 366)		// #4 - Decrease button
	SpriteFrame(0, 0, 20, 20, 168, 387)		// #5 - Decrease button Highlight
	SpriteFrame(0, 0, 20, 20, 189, 366)		// #6 - Increase button
	SpriteFrame(0, 0, 20, 20, 189, 387)		// #7 - Increase button Highlight
	SpriteFrame(45, 12, 13, 13, 488, 1)		// #8 - Triangle detail
	SpriteFrame(0, 0, 250, 37, 259, 421)	// #9 - Selection Border
	
	SpriteFrame(8, 8, 56, 13, 162, 646)		// #10 - R2 Name
	SpriteFrame(8, 8, 112, 13, 162, 660)	// #11 - R2 SoundTrack
	SpriteFrame(8, 8, 56, 13, 162, 674)		// #12 - Present
	SpriteFrame(8, 8, 32, 13, 219, 674)		// #13 - Past
	SpriteFrame(8, 8, 86, 13, 162, 702)		// #14 - Good Future
	SpriteFrame(8, 8, 80, 13, 162, 688)		// #15 - Bad Future
	SpriteFrame(8, 8, 56, 13, 162, 716)		// #16 - Author
	
	SpriteFrame(8, 8, 144, 13, 323, 616)	// #17 - Dubious Depths
	SpriteFrame(8, 8, 144, 13, 323, 633)	// #18 - Ridicule Root
	SpriteFrame(8, 8, 144, 13, 323, 650)	// #19 - Relic Ruins
	SpriteFrame(8, 8, 144, 13, 323, 667)	// #20 - Dubious Depths (Selected)
	SpriteFrame(8, 8, 144, 13, 323, 684)	// #21 - Ridicule Root (Selected)
	SpriteFrame(8, 8, 144, 13, 323, 701)	// #22 - Relic Ruins (Selected)
	
	SpriteFrame(8, 8, 64, 13, 162, 730)		// #23 - Original
	SpriteFrame(8, 8, 16, 13, 228, 730)		// #24 - US
	SpriteFrame(8, 8, 16, 13, 245, 730)		// #25 - JP
	SpriteFrame(8, 8, 66, 13, 442, 730)		// #26 - Alt. Mix 1
	SpriteFrame(8, 8, 96, 13, 278, 730)		// #27 - Sonic Stream
	SpriteFrame(8, 8, 66, 13, 375, 730)		// #28 - Alt. Mix 0
	SpriteFrame(8, 8, 66, 13, 442, 758)		// #29 - Alt. Mix 3
	SpriteFrame(8, 8, 64, 13, 162, 744)		// #30 - Original (Selected)
	SpriteFrame(8, 8, 16, 13, 228, 744)		// #31 - US (Selected)
	SpriteFrame(8, 8, 16, 13, 245, 744)		// #32 - JP (Selected)
	SpriteFrame(8, 8, 66, 13, 442, 744)		// #33 - Alt. Mix 1 (Selected)
	SpriteFrame(8, 8, 96, 13, 278, 744)		// #34 - Sonic Stream (Selected)
	SpriteFrame(8, 8, 66, 13, 375, 744)		// #35 - Alt. Mix 0 (Selected)
	SpriteFrame(8, 8, 66, 13, 442, 772)		// #36 - Alt. Mix 3 (Selected)
	
	SpriteFrame(8, 8, 49, 13, 219, 716)		// #37 - Johney
	SpriteFrame(8, 8, 78, 13, 262, 744)		// #38 - Cerebellum
	SpriteFrame(8, 8, 112, 13, 269, 716)	// #39 - Masafumi Ogata
	SpriteFrame(8, 8, 63, 13, 382, 716)		// #40 - Colterex
	SpriteFrame(8, 8, 65, 13, 249, 702)		// #41 - Jalex777
	
	SpriteFrame(8, 8, 113, 13, 262, 758)	// #42 - Press A to play song
	
	SpriteFrame(64, 12, 128, 16, 1, 856)	// #43 - R2 Settings
	SpriteFrame(64, 12, 128, 16, 1, 873)	// #44 - R5 Settings
	SpriteFrame(64, 12, 128, 16, 1, 890)	// #45 - R9 Settings
	SpriteFrame(64, 12, 128, 16, 1, 907)	// #46 - XXX Settings :trollface:

	SpriteFrame(64, 12, 128, 16, 130, 856)	// #47 - R2 Settings
	SpriteFrame(64, 12, 128, 16, 130, 873)	// #48 - R5 Settings
	SpriteFrame(64, 12, 128, 16, 130, 890)	// #49 - R9 Settings
	SpriteFrame(64, 12, 128, 16, 130, 907)	// #50 - XXX Settings :trollface:
	
	SpriteFrame(8, 8, 55, 13, 262, 730)		// #51 - ManuelZ
	SpriteFrame(8, 8, 72, 13, 208, 801)		// #52 - R5 Name
	SpriteFrame(8, 8, 128, 13, 208, 787)	// #53 - R5 SoundTrack
	
	SpriteFrame(8, 8, 144, 13, 282, 804)	// #54 - Desert Dazzle
	SpriteFrame(8, 8, 144, 13, 282, 821)	// #55 - Baneful Badland
	SpriteFrame(8, 8, 144, 13, 282, 838)	// #56 - Desert Dazzle (Selected)
	SpriteFrame(8, 8, 144, 13, 282, 855)	// #57 - Baneful Badland (Selected)
	
	SpriteFrame(8, 8, 109, 13, 338, 787)	// #58 - Nicolas
	SpriteFrame(-16, 8, 137, 13, 262, 772)	// #59 - Johney & Colterex
	SpriteFrame(8, 8, 110, 13, 282, 869)	// #60 - Master Remixes
	SpriteFrame(8, 8, 103, 13, 282, 883)	// #61 - Not Available
	SpriteFrame(8, 8, 65, 13, 249, 688)	// #62 - AngelFox

	ReadSaveRAM() // Read the RAM

	if SaveRAM[544] < 2
		SaveRAM[544] += 2
		CheckResult = true
	end if

	if SaveRAM[545] < 2
		SaveRAM[545] += 2
		CheckResult = true
	end if

	if SaveRAM[546] < 2
		SaveRAM[546] += 2
		CheckResult = true
	end if

	if CheckResult == true
		WriteSaveRAM()
	end if

end sub
